package com.cskaoyan.com.collection.collection;

import java.util.ArrayList;
import java.util.Collection;

public class DemoThread {
    public static void main(String[] args) {

        Collection<String> collection = new ArrayList<>();
        collection.add("zs");
        collection.add("ls");

        MyThread myThread = new MyThread(collection);
        myThread.start();

        System.out.println(collection);
    }
}
class MyThread extends  Thread{
    Collection collection;

    public MyThread(Collection collection){
        this.collection = collection;
    }
    @Override
    public void run(){
        System.out.println(collection);
    }
}